package org.jsoft.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LogSendServlet extends HttpServlet{

	/**
	 * 
	 */
	private static final long serialVersionUID = -337528743299321908L;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		
		this.doPost(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
			String opera = req.getParameter("op");
			String destJsp = "";
			if("write".equals(opera)){
				destJsp = "write_log.jsp";
			}else if("modify".equals(opera)){
				destJsp = "modify_log.jsp";
			}else if("see".equals(opera)){
				destJsp = "see_log.jsp";
			}else if("del".equals(opera)){
				destJsp = "del_log.jsp";
			}else if("export".equals(opera)){
				destJsp = "export_log.jsp";
			}
			req.getRequestDispatcher("//jsp//"+destJsp).forward(req, resp);
		
	}
	
}
